<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>交付效能分析平台</title>
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <div class="nav-container">
            <div class="nav-brand">
                <div class="brand-icon">
                    <i class="fas fa-chart-line"></i>
                </div>
                <span class="brand-text">效能分析</span>
            </div>
            <div class="nav-menu">
                <a href="#" class="nav-link active" data-section="analysis">分析</a>
                <a href="#" class="nav-link" data-section="reports">报告</a>
            </div>
        </div>
    </nav>

    <!-- 主要内容区域 -->
    <main class="main-content">
        <!-- 分析部分 -->
        <section id="analysis" class="section active">
            <!-- 英雄区域 -->
            <div class="hero-section">
                <h1 class="hero-title">智能交付效能分析</h1>
                <p class="hero-subtitle">上传数据，获得深度洞察，优化团队效能</p>
            </div>

            <!-- 上传区域 -->
            <div class="upload-section">
                <div class="upload-card">
                    <div class="upload-area" id="uploadArea">
                        <div class="upload-icon">
                            <i class="fas fa-cloud-upload-alt"></i>
                        </div>
                        <h3>上传Excel文件</h3>
                        <p>拖拽文件到此处或点击选择</p>
                        <input type="file" id="fileUpload" accept=".xls,.xlsx" hidden>
                    </div>
                    <div class="file-info" id="fileInfo" style="display: none;">
                        <div class="file-preview">
                            <i class="fas fa-file-excel"></i>
                            <div class="file-details">
                                <span class="file-name" id="fileName">文件名.xlsx</span>
                                <div class="file-meta">
                                    <span>行数: <strong id="rowCount">0</strong></span>
                                    <span>列数: <strong id="columnCount">0</strong></span>
                                </div>
                            </div>
                        </div>
                        <button class="btn-secondary" id="changeFile">更换文件</button>
                    </div>
                </div>
            </div>

            <!-- 分析指令区域 -->
            <div class="prompt-section">
                <div class="prompt-card">
                    <h3>分析指令</h3>
                    <textarea id="promptInput" placeholder="描述您的分析需求，例如：分析项目交付效能并找出关键瓶颈..."></textarea>
                    <div class="prompt-examples">
                        <p class="examples-title">快速开始</p>
                        <div class="examples-grid">
                            <button class="example-btn">分析项目交付周期的关键影响因素</button>
                            <button class="example-btn">识别资源分配效率低下的环节</button>
                            <button class="example-btn">评估团队协作效能并提出改进建议</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 分析按钮 -->
            <div class="action-section">
                <button class="btn-primary" id="analyzeBtn">
                    <i class="fas fa-bolt"></i>
                    开始分析
                </button>
            </div>

            <!-- 结果区域 -->
            <div class="result-section" id="resultCard" style="display: none;">
                <div class="result-card">
                    <div class="loading" id="analysisLoading">
                        <div class="spinner"></div>
                        <p>正在分析中，请稍候...</p>
                    </div>
                    <div class="result-content" id="analysisResult" style="display: none;">
                        <!-- 分析结果将在这里显示 -->
                    </div>
                    <div class="result-actions" style="display: none;">
                        <button class="btn-secondary" id="downloadBtn">
                            <i class="fas fa-file-pdf"></i>
                            下载PDF报告
                        </button>
                    </div>
                </div>
            </div>
        </section>

        <!-- 报告列表部分 -->
        <section id="reports" class="section" style="display: none;">
            <div class="reports-header">
                <h1>历史报告</h1>
                <p>查看和管理您的分析报告</p>
            </div>
            
            <div class="reports-controls">
                <div class="search-box">
                    <i class="fas fa-search"></i>
                    <input type="text" id="reportSearch" placeholder="搜索报告...">
                </div>
                <select id="reportFilter" class="filter-select">
                    <option value="all">全部状态</option>
                    <option value="completed">已完成</option>
                    <option value="processing">处理中</option>
                    <option value="failed">失败</option>
                </select>
            </div>

            <div class="reports-grid" id="reportsList">
                <!-- 报告列表将在这里显示 -->
                <div class="empty-state">
                    <i class="fas fa-folder-open"></i>
                    <h3>暂无报告记录</h3>
                    <p>开始您的第一次分析</p>
                </div>
            </div>
        </section>
    </main>

    <!-- 通知组件 -->
    <div class="notification" id="notification">
        <div class="notification-content">
            <i class="fas fa-info-circle"></i>
            <span id="notificationMessage"></span>
        </div>
    </div>

    <script src="js/main.js"></script>
</body>
</html>